void Bull(int *a,int size)
{
    for(int i = 0;i < size - 1;i++)
    {
        int flag = 0;
        for(int j = 0;j < size - 1 -i;j++)
        {
            if(a[j] > a[j+1])
            {
                int temp = a[j];
                a[j] = a[j+1];
                a[j+1] = temp;
                flag = 1;
            }
        }      
        if (flag == 0)
        {
            break;
        }
    }
}
void Insert(int *a,int size)
{
    for(int i = 1;i < size;i++)
    {
        int j = i;
        int temp = a[j];
        for(;j > 0;j--)
        {
            if(a[j-1] > temp)
                a[j] = a[j-1];
            else
                break;
        }
        a[j] = temp;
    }
}

void FastSort(int *a,int start,int end)
{
    if(start >= end)
    {
        return;
    }
    int left = start;
    int right = end;
    int temp = a[start];
    while(left < right)
    {
        while(a[right] > temp && left <right)
            right--;
        if(left < right)
            a[left++] = a[right];
        while(a[left] < temp && left <right)
            left++;
        if(left < right)
            a[right--] = a[left];
    }
    a[left] = temp;

    FastSort(a,start,left-1);
    FastSort(a,right+1,end);
}